#include "canitf.h"
#include "scan.h"
#include "ccan.h"

std::shared_ptr<rtbus::CANItf> rtbus::create_can(CANItf::CANType type)
{
    switch (type)
    {
    case CANItf::CANType::SOCKETCAN:
        return std::make_shared<rtbus::SCan>();
    case CANItf::CANType::CONTROLCAN:
        return std::make_shared<rtbus::CCan>();
    default:
        return nullptr;
    }
    //
}